﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using IChessEngine;

namespace ChessControls
{
    /// <summary>
    /// Interaction logic for PromotingWindow.xaml
    /// </summary>
    public partial class PromotingWindow : Window
    {
        public EChsPieceType type = EChsPieceType.QUEEN;
        public PromotingWindow()
        {
            InitializeComponent();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (sender == Knight)
                type = EChsPieceType.KNIGHT;
            else if (sender == Bishop)
                type = EChsPieceType.BISHOP;
            else if (sender == Rock)
                type = EChsPieceType.ROCK;
            else if (sender == Queen)
                type = EChsPieceType.QUEEN;
            this.Close();
        }
    }
}
